package cn.com.xiaoshoujia.common.service.impl;

import cn.com.xiaoshoujia.common.activity.CityActivity;
import cn.com.xiaoshoujia.common.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by yangrui on 2017/7/11.
 */
@Service
public class CityServiceImpl implements CityService {

    @Autowired
    private CityActivity cityActivity;

    @Override
    @Cacheable(value = "localCache", key = "#parentId")
    public List findByParentId(Long parentId) {
        return cityActivity.findByParentId(parentId);
    }
}
